<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
class Pages extends CI_Controller{
    public function index(){    	
		$this->load->helper('template_inheritance');
        //$this->load->view('templates/header');
		$this->load->view('pages/home');
		//$this->load->view('templates/footer');
    }
	
		
    public function view($page = 'home'){
    	echo $page;
        if ( ! file_exists('application/views/pages/'.$page.'.php'))
		{
			// Whoops, we don't have a page for that!
	            echo "Page : ".$page." Whoops, we don't have a page for that!";
			show_404();
		}
		
		$data['title'] = ucfirst($page); // Capitalize the first letter
		//$this->load->library('parser');
	
		$this->load->helper('template_inheritance');
	
        //$this->parser->parse('layout', $data);
		$this->load->view('pages/'.$page, $data);
		//$this->load->view('templates/footer', $data);
    }
}
?>
